<? if(!defined('IN_ROOT')) exit('Access Denied'); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"><? $user=$this->user; $setting=$this->setting; ?><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Manyou's Control Panel</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=MY_CHARSET?>">
<link media="all" type="text/css" href="css/common/admin/admincp.css" rel="stylesheet"/>
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/jqueryui.js" type="text/javascript"></script>
<script src="js/admin.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#list").sortable({
update: function(){
var reorderid="";
var numValue=$("input[name='order[]']");
for(var i=0;i<numValue.length;i++){
reorderid+=$(numValue[i]).val()+",";
}
var hiddencid=$("input[name='hiddencid']").val();
$.post("index.php?admin_cate/reordercate<?=$setting['seo_suffix']?>",{order:reorderid,hiddencid:hiddencid});
}
});
});
</script>
</head>
<body>

<div class="container"><? if(isset($message)) { $type=isset($type)?$type:'correctmsg';  ?><div class="<?=$type?>"><p><?=$message?></p></div><? } ?><h3 class="marginbot">系统分类管理<a class="sgbtn" href="index.php?admin_cate<?=$setting['seo_suffix']?>">系统分类管理</a><a class="sgbtn" href="index.php?admin_cate/out<?=$setting['seo_suffix']?>">同业分类管理</a></h3>

<div class="mainbox nomargin">

<table class="opt">
<tr>
<td><form name="askform" action="index.php?admin_cate<?=$setting['seo_suffix']?>" method="post"><input type="text" class="txt" name="catename" /><select name="stype"><option value="1">单选</option><option value="2">多选</option><option value="3">下拉</option></select><select name="mid"><option value="0">保留</option><option value="1">不保留</option></select><input class="btn" tabindex="3" type="submit" value=" 添加系统分类 " name="submit"><input type="hidden" value="add" name="job" /></form>&nbsp;&nbsp;</td><td>

<form name="askform" action="index.php?admin_cate<?=$setting['seo_suffix']?>" method="post">
上一级分类:<select name="cid">
<? if(is_array($catesys)) { foreach($catesys as $cate) { ?>
<option value="<?=$cate['id']?>"><?=$cate['name']?></option>
<? } } ?>
</select>分类名(一行一个):<textarea class="area" name="categorys"  style="height:30px;width:100px;" ></textarea><input class="btn" tabindex="3" type="submit" value=" 添加系统子分类 " name="submit"><input type="hidden" value="addcate" name="job" />
</form>
</td>
</tr>
</table>

</div>

<div class="mainbox nomargin">
<p class="i">编辑<?=$topname?>分类</p>
</div>
<div class="mainbox"><form name="askform" action="index.php?admin_cate/upcate<?=$setting['seo_suffix']?>" method="post">
<table width="80%" cellspacing="0" cellpadding="3" class="list">
<tr align="center" class="list_title">
<th width="80%" align="center"><strong>分类名称</strong></th>
<th width="20%" align="center"><strong>删除</strong></th>
</tr>    
</table>
    <input type="hidden" name="hiddencid" value="<?=$cid?>" />
<ul id="list" style="cursor: hand; cursor: pointer;" >
<? if(is_array($categorylist)) { foreach($categorylist as $cate) { ?>
<li style="list-style:none;">
<table width="80%"  class="list" id="table1">
<tr style="background:#f7f7f7">
<td width="80%" align="center"><input name="order[]" type="hidden" value="<?=$cate['id']?>"/><input type="text" size="20" value="<?=$cate['name']?>" name="cname[<?=$cate['id']?>]"></td>
<td width="20%" align="center"><a href="index.php?admin_cate/delcate/<?=$cate['id']?>/<?=$cid?><?=$setting['seo_suffix']?>"><img src="<?=SITE_URL?>css/common/admin/remove.png"></a></td>
</tr>
</table>
</li>
<? } } ?>
</ul>
<div class="opt" align="center">
<input class="btn" tabindex="3" type="submit" value=" 更新名称 " name="submit">
</div>
</form>
</div>
</div>
</body>
</html>